# This file is part of BlackArch Linux ( http://blackarch.org ).
# See COPYING for license details.

pkgname=linikatz
pkgver=48.d9cfdbf
pkgrel=1
pkgdesc='Tool to attack AD on UNIX.'
arch=('any')
groups=('blackarch' 'blackarch-automation' 'blackarch-scanner')
url='https://github.com/portcullislabs/linikatz'
license=('BSD')
makedepends=('git')
source=("git+https://github.com/portcullislabs/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"
  install -dm 755 "$pkgdir/usr/bin"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  cp -a --no-preserve=ownership * "$pkgdir/usr/share/$pkgname/"

  ln -s "/usr/share/$pkgname/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
}

